﻿{%include file="index.header.tpl.php"%}
{%include file="index.left.tpl.php"%}
  <!--主要内容开始-->
  <div class="content-wrapper">
    <section class="content">
      <div class="row">
        <section class="col-lg-12 connectedSortable">
         <div class="box box-default box-solid">
                <div class="box-header with-border">
                    <span class="fa fa-table" style="float:left; font-size:18px; margin-top:2px; color:#3c8dbc;" ></span>
                    <p class="box-title">{%$staff_data.staff_name%}教师个人课程表 {%if $set_data.set_double=='2'%}<a href="index.php?a=syllabus.info&staff_id={%$staff_data.staff_id%}&syllabus_double=1">{%if $syllabus_double=='1'%}当前{%/if%}单周</a> <a href="index.php?a=syllabus.info&staff_id={%$staff_data.staff_id%}&syllabus_double=2">{%if $syllabus_double=='2'%}当前{%/if%}双周</a>{%/if%}</p>
                </div>
                    <div class="box-body">
						<form name="myform" method="get" action="">
					 <div class="col-md-3 form-group">
                              <label for="inputPassword3" class="col-sm-5 control-label" style="padding-right:0; padding-left:0; font-weight:500; margin:0;">
                                   教师姓名：
                              </label>
                              <div class="input-group col-md-7 col-xs-12">
                                  <input name="q" id="staff_name" type="text" class="form-control" value="" autocomplete="off" >
                                  <input name="staff_id" id="staff_id" type="hidden" class="form-control" value="">
                              </div> 
                        </div>
                        <div class="col-md-1 col-xs-12">
                            <input name="a" type="hidden" class="form-control" value="syllabus.staffinfo">
                           <button type="submit" class="btn btn-primary">确 定</button>
                        </div>
						</form>
                        <table class="table table-bordered text-center" id="mytable">					 
								  <tr>
									 <td>节次</td>
									 {%foreach from=$week_lists key=key item=value%}
									 <td>{%$value%}</td>
									 {%/foreach%}
								  </tr>
								  {%foreach from=$out_am key=key item=value%}
								  <tr>
										 <td>{%$key%}</td>
										 {%foreach from=$value key=k item=v%}
										 <td>
											 {%$v.subject_name%}<br/>{%$v.class_name%}
										 </td>
										 {%/foreach%}
								 </tr>
								 {%/foreach%}
								  <tr>
								        <td></td>
								  </tr>
								  {%foreach from=$out_pm key=key item=value%}
								  <tr>
										 <td>{%$key%}</td>
										 {%foreach from=$value key=k item=v%}
										 <td>
											 {%$v.subject_name%}<br/>{%$v.class_name%}
										 </td>
										 {%/foreach%}
								 </tr>
								 {%/foreach%}
                         </table>  
				    </div><!--box-body -->
             </div><!--box box-default box-solid-->
        </section>   
           
        </div><!--row-->
    </section>
 </div>

 {%include file="index.footer.tpl.php"%}
<script src="static/js/run_prettify.js"></script>
<script src="static/js/jquery.mockjax.js"></script>
<script src="static/js/bootstrap-typeahead.js"></script>
 <script>
		$(function() {
			function displayResult(item) {
				$("#staff_id").val(item.value);
			}
			$('#staff_name').typeahead({
        source: [
			{%foreach from=$staff_lists key=key item=value%}
            { id: {%$value.staff_id%}, name: '{%$value.staff_name%}' },
			{%/foreach%}
        ],

				onSelect: displayResult,
			});
		  
		});
	</script>
 
 
 
 
 
